<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2><%=book._id? '更新':'添加'%>图书</h2>
    <form action="/book/<%=book._id? 'update':'add'%>" method="post">
        <% if(book._id){
        %>
        <input type="hidden" name="_id" value="<%=book._id%>"><br />
        <%
        } %>
        <input type="text" name="name" value="<%=book.name%>"><br />
        <input type="text" name="author" value="<%=book.author%>"><br />
        <input type="number" name="price" value="<%=book.price%>"><br />
        <input type="submit" value="提交">
    </form>
</body>

</html>